const userGroup = {
  namespaced: true,
  state: {
    // 规则条数
    ruleNums: 0,
    // 检验
    ruleValidate: true,
    // 导出的状态
    deriveState: true
  },

  mutations: {
    updateRuleNums: (state, num) => {
      state.ruleNums = num
    },

    updateRuleValidate: (state, res) => {
      state.ruleValidate = res
    },

    updateDeriveState: (state, bool) => {
      state.deriveState = bool
    }
  },

  actions: {
    updateRuleNums({ commit }, num) {
      commit('updateRuleNums', num)
    },

    updateRuleValidate({ commit }, val) {
      commit('updateRuleValidate', val)
    },
  },

  getters: {
    ruleNumsGetter(state) {
      return state.ruleNums
    },
    ruleValidateGetter(state) {
      return state.ruleValidate
    }
  }
}

export default userGroup
